:root,
:host {
  --van-pagination-height: 40px;
  --van-pagination-font-size: var(--van-font-size-md);
  --van-pagination-item-width: 36px;
  --van-pagination-item-default-color: var(--van-primary-color);
  --van-pagination-item-disabled-color: var(--van-gray-7);
  --van-pagination-item-disabled-background: var(--van-background);
  --van-pagination-background: var(--van-background-2);
  --van-pagination-desc-color: var(--van-gray-7);
  --van-pagination-disabled-opacity: var(--van-disabled-opacity);
}

.van-pagination {
  font-size: var(--van-pagination-font-size);

  &__items {
    display: flex;
  }

  &__item,
  &__page-desc {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &__item {
    flex: 1;
    box-sizing: border-box;
    min-width: var(--van-pagination-item-width);
    height: var(--van-pagination-height);
    color: var(--van-pagination-item-default-color);
    background: var(--van-pagination-background);
    cursor: pointer;
    user-select: none;

    button {
      flex: 1;
      height: 100%;
      border: none;
      padding: 0;
      background: transparent;

      &[disabled] {
        cursor: not-allowed;
      }
    }

    &:active {
      color: var(--van-white);
      background-color: var(--van-pagination-item-default-color);
    }

    &:not(:last-child)::after {
      border-right-width: 0;
    }

    &--active {
      color: var(--van-white);
      background-color: var(--van-pagination-item-default-color);
    }

    &--page {
      flex-grow: 0;
    }

    &--prev,
    &--next {
      padding: 0 var(--van-padding-base);
      cursor: pointer;
    }

    &--border:first-child::after {
      border-right-width: var(--van-border-width);
    }

    &--disabled {
      &,
      &:active {
        color: var(--van-pagination-item-disabled-color);
        background-color: var(--van-pagination-item-disabled-background);
        opacity: var(--van-pagination-disabled-opacity);
      }
    }
  }

  &__page-desc {
    flex: 1;
    height: var(--van-pagination-height);
    color: var(--van-pagination-desc-color);
  }
}
